import React from 'react';
import { Link } from 'react-router-dom';
import classNames  from 'classnames';
export function ListItem(props, /* context */) {
    return 	<dl className="house">
    <dd className="house_img">
        <img src="http://mf.znimg.com/thumb/dress_224x168//house_img/6788/c02487361cfc595174bc6621f3da78a1.jpg" 
        alt=''
            width="100%"/>
    </dd>
    <dt className="house_info">
        <Link to={"/rooms/"+props.id+"/"}><h5 className="house_name">{props.name}<span className="house_price">&yen;{props.price_range[0]} ～ &yen;{props.price_range[1]}/月 </span>
</h5></Link>
        <div className="house_note">
        {props.type==="condo" &&<React.Fragment>
            <span>{props.structure[0]}室{props.structure[1]}厅{props.structure[2]}卫</span>
            <span>余{props.stock[1]}间</span>
            <span>{props.floor[0]}/{props.floor[1]}层</span></React.Fragment>
            }
        {props.type==="hostel" && <React.Fragment>
            <span>总{props.stock[0]}套</span>
            <span>余{props.stock[1]}套</span>
            </React.Fragment>
            } 

        </div>
        <div className="house_label">
        {props.type==="condo"&& <span>小区式</span>}
        {props.type==="hostel"&& <span>公寓式</span>}
        </div>
        <div className={classNames({'room_dizhi':true,'house_juli':true})}>
            <i></i>
            <span>{props.address}</span>
        </div>
    </dt>
</dl>
  }